<template>
  <div class="biao">
    <van-nav-bar title="面霜" left-text="" left-arrow @click-left="onClickLeft">
      <template #right>
        <img
          src="https://m.cdfgsanya.com/wap/resources/images/icons/icon-search@2x.444b6495.png"
          alt=""
        />
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
import Vue from "vue";
import { NavBar } from "vant";
import { Toast } from "vant";

Vue.use(NavBar);
export default {
  methods: {
    onClickLeft() {
      this.$router.push("/home");
    },
    onClickRight() {
      Toast("按钮");
    },
  },
};
</script>

<style scoped>
.biao {
  position: sticky;
  top: 0;
  z-index: 3;
}
.van-nav-bar img {
  width: 20px;
}
</style>